Java EE Development with Eclipse Second Edition by Kulkarni Ram

Java EE Development with Eclipse Second Edition by Kulkarni Ram
Author: Kulkarni, Ram
Language: eng
Format: epub
Publisher: Packt Publishing
Published: 2015-09-29

Start Tomcat in the debug mode, and run listCourses.jsp in the Debug mode. Because we have put in the Thread.sleep statements, the request will take time. Go to the Debug view where the threads and stack frames are displayed. Click on the first node under the Tomcat debug configuration node and select the Suspend option, as shown in the following screenshot:

Figure 6.15 Suspend program execution

The debugger pauses the execution of all threads in the program. You can then see the status of each thread by expanding the thread nodes. You will find one of the threads executing the CourseDAO.getCourse method and the statement that it was executing before being suspended:

Figure 6.16 Status of suspended threads